//
//  UIView+Additions.m
//  HuairouInsight
//
//  Created by xiangming on 14-4-28.
//  Copyright (c) 2014年 elitework. All rights reserved.
//


#import "UIView+Additions.h"

@implementation UIView (Additions)


- (UIViewController *)viewController
{
    UIResponder *next = [self nextResponder];
    do{
        if([next isKindOfClass:[UIViewController class]]){
            return (UIViewController *)next;
        }
        next = [next nextResponder];
    }while(next!=nil);
    return nil;
}


@end
